﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using dhSystemBLL.produceBLL;
using dhDataAcess.produceLinq;
using baseSet;
using baseSet.importExport;
using dhDataAcess.baseBLL;

namespace dhsystem.produceForm.pdrk
{
    public partial class Frmstartcoloration : Form
    {
        pdfpjlbBLL pdfpjlb = new pdfpjlbBLL();
        pdfpjlbModel pdfpjlbRow = new pdfpjlbModel();
        string billoNo;
        string orderDetailNo;
        public Frmstartcoloration(string _billoNo,string _orderDetailNo)
        {
            InitializeComponent();
            billoNo = _billoNo;
            orderDetailNo = _orderDetailNo;
        }


    
        
        private void toolSave_Click(object sender, EventArgs e)
        {
           
        }
        //打开窗口显示
        private void Frmstartcoloration_Load(object sender, EventArgs e)
        {
            //bindingSourcepdfpjlb.DataSource = pdfpjlb.getpdfpjlbAllBybillStatus("开始染色");
            //dGridDetail.DataSource = bindingSourcepdfpjlb;
            //DcolumnSet.colSet(moduleInfo.pdfpjlb, dGridDetail);
        }

        private void textdyestatus_TextChanged(object sender, EventArgs e)
        {

        }

        private void toolExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        //染色完成确认
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult result = MessageBox.Show("是否确认染色完成！", "提示信息", MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    basicSql.getpdpqbStatusmarkUpdate(billoNo, textdyestatus.Text);
                }
                MessageBox.Show("确认完成成功");
                basicSql.getdetailStatusUpdate(orderDetailNo, "染色完成");
                basicSql.getpdpqbbillStatusUpdate(billoNo, "染色完成");
            }
            catch (FormatException ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
    }
}
